package com.taozi.netty.socketio.use.classroomchat.service.education.impl;


import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.taozi.netty.socketio.use.classroomchat.entity.entity.education.Classroom;
import com.taozi.netty.socketio.use.classroomchat.mapper.education.ClassroomMapper;
import com.taozi.netty.socketio.use.classroomchat.service.education.IClassroomService;
import com.taozi.netty.socketio.use.classroomchat.entity.vo.education.ClassroomBean;
import com.taozi.netty.socketio.use.classroomchat.entity.vo.education.ClassroomVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 课堂信息
 *
 * @author mingtao
 */
@Service
public class ClassroomServiceImpl implements IClassroomService {

    @Autowired
    ClassroomMapper classroomMapper;


    @Override
    public int delete(List<Integer> idList) {
        return 0;
    }

    @Override
    public Classroom insert(ClassroomVo classroomVo) {

        //业务逻辑添加


        return null;
    }

    @Override
    public Page<ClassroomBean> pageFindList(ClassroomVo classroomVo) {
        PageHelper.startPage(classroomVo.getPage(), classroomVo.getRows());
        Page<ClassroomBean> pageFindList = classroomMapper.pageFindList(classroomVo);
        for(ClassroomBean classroomBean : pageFindList){
            classroomBean.setLecturerName("默认名");
        }

        return pageFindList;
    }


    @Override
    public int update(ClassroomVo classroomVo) {
        return 0;
    }

}
